package com.huawei.appmarket.service.studentmode;

import android.content.ActivityNotFoundException;
import android.content.Intent;
import android.os.Bundle;
import com.huawei.appmarket.framework.activity.SecureActivity;
import com.huawei.appmarket.service.studentmode.view.ProxyActivityProtocol;
import o.Logger;
import o.ejf;

public class ProxyActivity extends SecureActivity<ProxyActivityProtocol> {
    private static final String ˏॱ = ProxyActivity.class.getSimpleName();
    private static ejf ͺ;

    public static void ˊ(ejf o_ejf) {
        ͺ = o_ejf;
    }

    public void onCreate(Bundle bundle) {
        Logger.ˎ("ProxyActivity", "onCreate");
        super.onCreate(bundle);
        getWindow().requestFeature(1);
        ʼ();
    }

    public void onActivityResult(int i, int i2, Intent intent) {
        super.onActivityResult(i, i2, intent);
        Logger.ˎ("ProxyActivity", "onActivityResult requestCode=" + i);
        if (i == 1001) {
            if (i2 == -1) {
                if (ͺ != null) {
                    ͺ.ˋ();
                }
            } else if (ͺ != null) {
                ͺ.ॱ();
            }
        }
        finish();
    }

    public void onDestroy() {
        Logger.ˎ("ProxyActivity", "onDestroy");
        super.onDestroy();
    }

    private void ʼ() {
        Logger.ˎ("ProxyActivity", "startActivityForResult");
        try {
            Intent intent = new Intent();
            intent.setClassName("com.huawei.parentcontrol", "com.huawei.parentcontrol.ui.activity.ConfirmPasswordActivity");
            startActivityForResult(intent, 1001);
        } catch (ActivityNotFoundException e) {
            Logger.e(ˏॱ, e.toString());
        } catch (SecurityException e2) {
            Logger.e(ˏॱ, e2.toString());
        }
    }

    public void onResume() {
        super.onResume();
        Logger.ˎ("ProxyActivity", "onResume");
    }
}
